Repository navigation
fix(backup): keep backups local until a remote is configured - #1303
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review endedClawSweeper stopped reviewing this revision because the pull request closed. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6bc144af17
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if err != nil || !changed || !push || !HasRemote(ctx, cfg.Repo) { | ||
| return changed, err |
There was a problem hiding this comment.
Install the configured origin before silently skipping uploads
After a default local-only initialization, following the new instruction to run gog backup init --remote <URL> saves the URL but never installs an origin: ensureRepo returns through pullRepo immediately when .git already exists. Subsequent backups therefore hit this new guard and return success without uploading anything. Because the saved cfg.Remote is nonempty, prepareBackupPush also stops printing the local-only warning, leaving users believing remote backups are enabled. Add the explicitly configured origin when an existing repository has none, while preserving any existing origin.
Useful? React with 👍 / 👎.
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(backup): keep backups local until a remote is configured This is item 1/1 in the current shard. Shard 0/1. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Allow a local backup repository to acquire its first configured origin. After `gog backup init` without a remote, `gog backup init --remote URL` now adds the missing origin so subsequent pushes use it. Existing origins are never replaced, even when a different remote is supplied in configuration. Follow-up to #1303 and #1287. Synthetic proof first reproduced the missing-origin failure, then verified initialization, a push to a temporary local bare repository, and preservation of the existing origin. No real backup was run or personal configuration changed. Full gate: `make ci` passed on the dedicated Linux Crabbox lease (run `run_1fd82869a516d40c0c3e78f16c0b3efc`). Independent Codex P0–P2 final review is clean.
New backups no longer select a maintainer-owned repository. They commit locally until the user configures a remote, and the CLI explains local-only operation. Explicit saved remotes and existing Git origins continue to work without rewrites; checkpoint uploads follow the same rule.
Closes #1287.
Validation: the default-remote regression fails on the previous implementation. Synthetic tests pass for local initialization, snapshot/checkpoint commits without a remote, and pushing to a temporary bare Git origin. No real backup or Google-account access was performed. The backup guide documents explicit remote setup. Independent Codex P0–P2 review is clean.
Full gate:
make ciandgovulncheck ./...passed on the dedicated Linux Crabbox lease (runrun_8ec2e0593acf4e96b1e01faab914ef5a). Govulncheck found no reachable vulnerabilities.